const defaultState = {
  num: 0,
  banners: [],
};

function reducer(state = defaultState, action) {
  switch (action.type) {
    case 'CHANGE_NUM':
      return {...state, num: state.num + action.num};
    case 'CHANGE_BANNERS':
      return {...state, banners: action.banners};
    default:
      return {...state};
  }
}
export default reducer;
